3.450 \(\int \frac{(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=187 \[ -\frac{a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d)^2 \sqrt{c^2-d^2}}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}+\frac{(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}+\frac{a^3 x}{d^3} \]

[Out]

(a^3*x)/d^3 - (a^3*(c - d)*(2*c^2 + 6*c*d + 7*d^2)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d^3*(c +
 d)^2*Sqrt[c^2 - d^2]*f) + ((c - d)*Cos[e + f*x]*(a^3 + a^3*Sin[e + f*x]))/(2*d*(c + d)*f*(c + d*Sin[e + f*x])
^2) + (a^3*(c - d)*(2*c + 5*d)*Cos[e + f*x])/(2*d^2*(c + d)^2*f*(c + d*Sin[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.477478, antiderivative size = 187, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.28, Rules used = {2762, 2968, 3021, 2735, 2660, 618, 204} \[ -\frac{a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d)^2 \sqrt{c^2-d^2}}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}+\frac{(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}+\frac{a^3 x}{d^3} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^3,x]

[Out]

(a^3*x)/d^3 - (a^3*(c - d)*(2*c^2 + 6*c*d + 7*d^2)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d^3*(c +
 d)^2*Sqrt[c^2 - d^2]*f) + ((c - d)*Cos[e + f*x]*(a^3 + a^3*Sin[e + f*x]))/(2*d*(c + d)*f*(c + d*Sin[e + f*x])
^2) + (a^3*(c - d)*(2*c + 5*d)*Cos[e + f*x])/(2*d^2*(c + d)^2*f*(c + d*Sin[e + f*x]))

Rule 2762

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[(b^2*(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(n + 1)*(b*c
+ a*d)), x] + Dist[b^2/(d*(n + 1)*(b*c + a*d)), Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1)*
Simp[a*c*(m - 2) - b*d*(m - 2*n - 4) - (b*c*(m - 1) - a*d*(m + 2*n + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a,
 b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && LtQ[n, -1]
&& (IntegersQ[2*m, 2*n] || IntegerQ[m + 1/2] || (IntegerQ[m] && EqQ[c, 0]))

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3021

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m +
 1)*(a^2 - b^2)), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B + a*
C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e,
 f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx &=\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a \int \frac{(a+a \sin (e+f x)) (a (c-5 d)-2 a (c+d) \sin (e+f x))}{(c+d \sin (e+f x))^2} \, dx}{2 d (c+d)}\\ &=\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a \int \frac{a^2 (c-5 d)+\left (a^2 (c-5 d)-2 a^2 (c+d)\right ) \sin (e+f x)-2 a^2 (c+d) \sin ^2(e+f x)}{(c+d \sin (e+f x))^2} \, dx}{2 d (c+d)}\\ &=\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{a \int \frac{a^2 (c-d) d (c+7 d)+2 a^2 (c-d) (c+d)^2 \sin (e+f x)}{c+d \sin (e+f x)} \, dx}{2 (c-d) d^2 (c+d)^2}\\ &=\frac{a^3 x}{d^3}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right )\right ) \int \frac{1}{c+d \sin (e+f x)} \, dx}{2 d^3 (c+d)^2}\\ &=\frac{a^3 x}{d^3}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+2 d x+c x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d)^2 f}\\ &=\frac{a^3 x}{d^3}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\left (2 a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (c^2-d^2\right )-x^2} \, dx,x,2 d+2 c \tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d)^2 f}\\ &=\frac{a^3 x}{d^3}-\frac{a^3 (c-d) \left (2 c^2+6 c d+7 d^2\right ) \tan ^{-1}\left (\frac{d+c \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{d^3 (c+d)^2 \sqrt{c^2-d^2} f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}\\ \end{align*}

Mathematica [A]  time = 0.985872, size = 196, normalized size = 1.05 \[ \frac{a^3 (\sin (e+f x)+1)^3 \left (-\frac{2 \left (4 c^2 d+2 c^3+c d^2-7 d^3\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{(c+d)^2 \sqrt{c^2-d^2}}+\frac{3 d \left (c^2+c d-2 d^2\right ) \cos (e+f x)}{(c+d)^2 (c+d \sin (e+f x))}-\frac{d (c-d)^2 \cos (e+f x)}{(c+d) (c+d \sin (e+f x))^2}+2 (e+f x)\right )}{2 d^3 f \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^6} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^3,x]

[Out]

(a^3*(1 + Sin[e + f*x])^3*(2*(e + f*x) - (2*(2*c^3 + 4*c^2*d + c*d^2 - 7*d^3)*ArcTan[(d + c*Tan[(e + f*x)/2])/
Sqrt[c^2 - d^2]])/((c + d)^2*Sqrt[c^2 - d^2]) - ((c - d)^2*d*Cos[e + f*x])/((c + d)*(c + d*Sin[e + f*x])^2) +
(3*d*(c^2 + c*d - 2*d^2)*Cos[e + f*x])/((c + d)^2*(c + d*Sin[e + f*x]))))/(2*d^3*f*(Cos[(e + f*x)/2] + Sin[(e
+ f*x)/2])^6)

________________________________________________________________________________________

Maple [B]  time = 0.149, size = 1400, normalized size = 7.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x)

[Out]

1/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^2*tan(1/2*f*x+1/2*e)^3+5/f*a^3
/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^3-4/f*a^3*d/(c*tan(1
/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3-2/f*a^3*d^2/(c*tan(1/2*f*x+1/
2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)/c*tan(1/2*f*x+1/2*e)^3+2/f*a^3/d^2/(c*tan(1/2*f*x+1/2*e)^2+
2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^3*tan(1/2*f*x+1/2*e)^2+4/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1
/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^2*tan(1/2*f*x+1/2*e)^2-1/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/
2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^2+7/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)
^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^2-10/f*a^3*d^2/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+
2*c*d+d^2)/c*tan(1/2*f*x+1/2*e)^2-2/f*a^3*d^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d
^2)/c^2*tan(1/2*f*x+1/2*e)^2+7/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2*c^2/(c^2+2*c*d+d^2)
*tan(1/2*f*x+1/2*e)+11/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2*c/(c^2+2*c*d+d^2)*tan(1/2*f*x
+1/2*e)-16/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)-2/f*
a^3*d^2/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/c/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)+2/f*a^3/d^2/(
c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^3+4/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan
(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^2-5/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*
c*d+d^2)*c-1/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)-2/f*a^3/d^3/(c^2+2*c*
d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*c^3-4/f*a^3/d^2/(c^2+2*c*d+d^2
)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*c^2-1/f*a^3/d/(c^2+2*c*d+d^2)/(c^2-
d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*c+7/f*a^3/(c^2+2*c*d+d^2)/(c^2-d^2)^(1/2)*
arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))+2/f*a^3/d^3*arctan(tan(1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.12509, size = 2256, normalized size = 12.06 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

[1/4*(4*(a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x*cos(f*x + e)^2 - 4*(a^3*c^4 + 2*a^3*c^3*d + 2*a^3*c^2*d^2 +
2*a^3*c*d^3 + a^3*d^4)*f*x - (2*a^3*c^4 + 6*a^3*c^3*d + 9*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d^4 - (2*a^3*c^2*d
^2 + 6*a^3*c*d^3 + 7*a^3*d^4)*cos(f*x + e)^2 + 2*(2*a^3*c^3*d + 6*a^3*c^2*d^2 + 7*a^3*c*d^3)*sin(f*x + e))*sqr
t(-(c - d)/(c + d))*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2 + 2*((c^2 + c*d)*cos(f*
x + e)*sin(f*x + e) + (c*d + d^2)*cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(d^2*cos(f*x + e)^2 - 2*c*d*sin(f*x +
e) - c^2 - d^2)) - 2*(2*a^3*c^3*d + 4*a^3*c^2*d^2 - 5*a^3*c*d^3 - a^3*d^4)*cos(f*x + e) - 2*(4*(a^3*c^3*d + 2*
a^3*c^2*d^2 + a^3*c*d^3)*f*x + 3*(a^3*c^2*d^2 + a^3*c*d^3 - 2*a^3*d^4)*cos(f*x + e))*sin(f*x + e))/((c^2*d^5 +
 2*c*d^6 + d^7)*f*cos(f*x + e)^2 - 2*(c^3*d^4 + 2*c^2*d^5 + c*d^6)*f*sin(f*x + e) - (c^4*d^3 + 2*c^3*d^4 + 2*c
^2*d^5 + 2*c*d^6 + d^7)*f), 1/2*(2*(a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x*cos(f*x + e)^2 - 2*(a^3*c^4 + 2*a
^3*c^3*d + 2*a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x - (2*a^3*c^4 + 6*a^3*c^3*d + 9*a^3*c^2*d^2 + 6*a^3*c*d^3
 + 7*a^3*d^4 - (2*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d^4)*cos(f*x + e)^2 + 2*(2*a^3*c^3*d + 6*a^3*c^2*d^2 + 7*a
^3*c*d^3)*sin(f*x + e))*sqrt((c - d)/(c + d))*arctan(-(c*sin(f*x + e) + d)*sqrt((c - d)/(c + d))/((c - d)*cos(
f*x + e))) - (2*a^3*c^3*d + 4*a^3*c^2*d^2 - 5*a^3*c*d^3 - a^3*d^4)*cos(f*x + e) - (4*(a^3*c^3*d + 2*a^3*c^2*d^
2 + a^3*c*d^3)*f*x + 3*(a^3*c^2*d^2 + a^3*c*d^3 - 2*a^3*d^4)*cos(f*x + e))*sin(f*x + e))/((c^2*d^5 + 2*c*d^6 +
 d^7)*f*cos(f*x + e)^2 - 2*(c^3*d^4 + 2*c^2*d^5 + c*d^6)*f*sin(f*x + e) - (c^4*d^3 + 2*c^3*d^4 + 2*c^2*d^5 + 2
*c*d^6 + d^7)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3/(c+d*sin(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.48818, size = 705, normalized size = 3.77 \begin{align*} \frac{\frac{{\left (f x + e\right )} a^{3}}{d^{3}} - \frac{{\left (2 \, a^{3} c^{3} + 4 \, a^{3} c^{2} d + a^{3} c d^{2} - 7 \, a^{3} d^{3}\right )}{\left (\pi \left \lfloor \frac{f x + e}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (c\right ) + \arctan \left (\frac{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + d}{\sqrt{c^{2} - d^{2}}}\right )\right )}}{{\left (c^{2} d^{3} + 2 \, c d^{4} + d^{5}\right )} \sqrt{c^{2} - d^{2}}} + \frac{a^{3} c^{4} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 5 \, a^{3} c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 4 \, a^{3} c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 2 \, a^{3} c d^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 2 \, a^{3} c^{5} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 4 \, a^{3} c^{4} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - a^{3} c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 7 \, a^{3} c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 10 \, a^{3} c d^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 2 \, a^{3} d^{5} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 7 \, a^{3} c^{4} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 11 \, a^{3} c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 16 \, a^{3} c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \, a^{3} c d^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 2 \, a^{3} c^{5} + 4 \, a^{3} c^{4} d - 5 \, a^{3} c^{3} d^{2} - a^{3} c^{2} d^{3}}{{\left (c^{4} d^{2} + 2 \, c^{3} d^{3} + c^{2} d^{4}\right )}{\left (c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 2 \, d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + c\right )}^{2}}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

((f*x + e)*a^3/d^3 - (2*a^3*c^3 + 4*a^3*c^2*d + a^3*c*d^2 - 7*a^3*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c
) + arctan((c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((c^2*d^3 + 2*c*d^4 + d^5)*sqrt(c^2 - d^2)) + (a^3*c
^4*d*tan(1/2*f*x + 1/2*e)^3 + 5*a^3*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 4*a^3*c^2*d^3*tan(1/2*f*x + 1/2*e)^3 - 2*
a^3*c*d^4*tan(1/2*f*x + 1/2*e)^3 + 2*a^3*c^5*tan(1/2*f*x + 1/2*e)^2 + 4*a^3*c^4*d*tan(1/2*f*x + 1/2*e)^2 - a^3
*c^3*d^2*tan(1/2*f*x + 1/2*e)^2 + 7*a^3*c^2*d^3*tan(1/2*f*x + 1/2*e)^2 - 10*a^3*c*d^4*tan(1/2*f*x + 1/2*e)^2 -
 2*a^3*d^5*tan(1/2*f*x + 1/2*e)^2 + 7*a^3*c^4*d*tan(1/2*f*x + 1/2*e) + 11*a^3*c^3*d^2*tan(1/2*f*x + 1/2*e) - 1
6*a^3*c^2*d^3*tan(1/2*f*x + 1/2*e) - 2*a^3*c*d^4*tan(1/2*f*x + 1/2*e) + 2*a^3*c^5 + 4*a^3*c^4*d - 5*a^3*c^3*d^
2 - a^3*c^2*d^3)/((c^4*d^2 + 2*c^3*d^3 + c^2*d^4)*(c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*x + 1/2*e) + c)^2)
)/f